package org.example.exception;

import org.example.domain.result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ProjectException {
    @ExceptionHandler(Exception.class)
    public result projectException( Exception ex ) {
        System.out.println( "出现异常"+ex.getMessage() );
        return new result("服务器异常，请稍后重试");

    }
}
